<template>
    <div>
       <van-search v-model="value" shape="round" placeholder="请输入关键字"  @search="onSearch"/>
        <div>
            <h2>搜索历史</h2>
            <van-button color="#7232dd">自行车</van-button>
            <van-button color="#7232dd" style="margin-left: 15px;">智利干露</van-button>
        </div>
        <div>
            <h2>搜索发现</h2>
            <van-button color="#7232dd">智利干露</van-button>
            <van-button color="#7232dd" style="margin-left: 20px;">自行车</van-button>
            <van-button color="#7232dd" style="margin-left: 24px;">进口红酒</van-button>
            <van-button color="#7232dd" style="margin-top: 15px;">纸巾小包</van-button>
            <van-button color="#7232dd" style="margin-left: 15px;">笔记本电脑</van-button>
        </div>
    </div>
</template>

<script setup>
import { ref } from 'vue';
import { useRouter } from 'vue-router'
const router = useRouter()
const value = ref('');
  const onSearch = () => {
          router.push('/xq')
  }
</script>

<style lang="scss" scoped></style>